package com.sunjob.mroresumeproject.service;

import com.sunjob.common.domain.assets.Instance;
import com.sunjob.common.domain.mroresume.WHBus;
import com.sunjob.common.util.MROUtils;
import com.sunjob.mroresumeproject.dao.WHBusMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class WHBusServiceImpl implements WHBusService{

    @Autowired
    WHBusMapper whBusMapper;


    @Override
    public int querycount() {
        return whBusMapper.querycount();
    }

    @Override
    public List<WHBus> queryWHBus(int pages, int size) {
        return whBusMapper.queryWHbus(pages,size);
    }

    @Override
    public List<WHBus> queryWHBus2(String Instance_id) {
        return whBusMapper.queryWHBus2(Instance_id);
    }

    @Override
    public void insertBus(WHBus whBus) {

        whBus.setCreate_date(LocalDateTime.now());
        whBusMapper.insertBus(whBus);
    }

    @Override
    public void deleteWHBusone(String s) {
        whBusMapper.deleteWHBusone(s);
    }



    @Override
    public List<WHBus> queryWHBusone(Long Instance_id) {
        return whBusMapper.queryWHBusone(Instance_id);
    }

    @Override
    public void updateWHBus(WHBus whBus) {
     whBusMapper.updateWHBus(whBus);
    }

    @Override
    public void deleteWHBus(String Instance_id) {
      whBusMapper.deleteWHBus(Instance_id);
    }
}
